from http import HTTP

class YuShuBook:
	"""docstring for YuShuBook"""
	isbn_url = 'http://t.yushu.im/v2/book/isbn/{}'
	keyword_url = 'http://t.yushu.im/v2/book/search?q={}&count={}&start={}'

	@classmethod
	def search_by_isbn(self, isbn):
		url = self.isbn_url.format(isbn)
		result = HTTP.get(url)
		return result

	@classmethod
	def search_by_keyword(self, keyword, count=15, start=0):	
		url = self.keyword_url.format(keyword,count,start)
		result = HTTP.get(url)
		return result